<!DOCTYPE html>
<html lang="en" xmlns="">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="root">
    <label>
        <input id="num1" type="number">
        <input id="num2" type="number">
        <button onclick="f()">点击我计算和差乘除</button>
    </label>
    <div id="r"></div>
</div>
<script>

    function f() {
        let n1 = document.getElementById("num1").value * 1
        let n2 = document.getElementById("num2").value * 1
        add = n1 + n2;
        sub = n1 - n2;
        Init = n1 / n2;
        Product = n1 * n2;


        r.innerHTML = "两数的和为：" + add + " " +
            "两数的差为：" + sub + " " +
            "两数相除：" + Init + " " +
            "两数的乘积：" + Product

    }

</script>

</body>
</html>